home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16660 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: newsfeed.internetmci.com!btnet!usenet
  2. From: ehteam@telecall.co.uk (Paul Harris)
  3. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  4. Subject: Re: Young programmers read me.
  5. Date: 11 Apr 1996 17:44:06 GMT
  6. Organization: BTnet, BT Public Internet Service
  7. Message-ID: <1557.6675T1105T358@telecall.co.uk>
  8. References: <4kj3rp$11d@news1.mnsinc.com>
  9. NNTP-Posting-Host: dial14.telecall.co.uk
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12. All my life I've been waiting for someone to talk about "Re: Young
  13. programmers read me.", then on 11-Apr-96 14:10:01, Paul Speed said:
  14.  
  15. >Glenn Farrow (gfarrow@rainbow.rmii.com) wrote:
  16. >: John Joseph Newbigin <079519@bud.cc.swin.edu.au> writes:
  17.  
  18. >: >But it is a lot easier to read
  19.  
  20. >: >if(something_happened)
  21. >: >{
  22. >: >     do_something_else();
  23. >: >}
  24. >: >is_n't_it();   :)
  25.  
  26. >: Nonesense.  This style is extremely annoying because it spreads the code
  27. >: out too much, it increases the amount you have to page around a source
  28. >: file.   Putting "{" on a separate line is a waste of space that should be
  29. >: occupied by code.
  30.  
  31. >       Sure, I can understand that this might be a problem if you're 
  32. >still using edlin. :)  This is really a personal preference issue and 
  33. >nobody is going to change anyone else's mind.  My problem with the less 
  34. >space argument is that it implies that you don't comment your code either.
  35. >Not to mention the fact that you might as well shove most of your code 
  36. >onto the same lines, only line-breaking when absolutely needed.
  37.  
  38. >void foo(int i, char *list){int t;for(t=0;t<i;t++){printf("#%i",t);
  39. >printf("%s\n",list[t]);}printf("%i total.\n",t);}
  40.  
  41. >       Wow!  Look at how much space that saved.  I could put all my code 
  42. >in just two or three pages.  :)  I much prefer.
  43.  
  44. There is a neat feature in Amos on the Amiga called "fold", well, really
  45. it is a feature of the Amos editor, to pack functions or expand them as
  46. you require.
  47.  
  48.  
  49. Paul
  50.  
  51. Internet: ehteam@telecall.co.uk, http://www.telecall.co.uk/pharris/
  52. Fidonet:  2:255/110.2
  53.  
  54.  
  55.